<template>
    <div class='pagination'>
        <el-pagination background layout="prev, pager, next" 
        :total="total" 
        size='small' 
        v-model:current-page="currentPage"
        @current-change="changePage"/>
    </div>
</template>

<script setup>
    import { ref } from 'vue'
    const emit = defineEmits(['currentPage'])
    const currentPage = ref(1) 
    const props = defineProps({
        total: {
            type: Number,
            require: true
        }
    })

    const changePage = () => {
        // console.log(currentPage.value);
        emit('currentPage', currentPage.value)
    }

</script>

<style lang='scss' src="@/styles/components/Pagination.scss" scoped>


</style>